import request from '@/utils/request'

// 查询按钮功能列表
export function findFuncList(id, name, pageIndex, pageSize) {
  return request({
    url: '/authority/auFunction/queryList',
    method: 'get',
    params: { id, name, pageIndex, pageSize }
  })
}

// 查询按钮功能详情
export function findFuncDetail(id) {
  return request({
    url: '/authority/auFunction/detail',
    method: 'get',
    params: { id }
  })
}

// 删除按钮功能
export function deleteButFunc(id) {
  return request({
    url: '/authority/auFunction/delete',
    method: 'delete',
    params: { id }
  })
}

// 添加按钮功能
export function createFuncAdd(data) {
  return request({
    url: '/authority/auFunction/add',
    method: 'post',
    data
  })
}

// 修改按钮功能
export function updateButFunc(data) {
  return request({
    url: '/authority/auFunction/update',
    method: 'put',
    data
  })
}
